package com.yn.pet.bus.entity;

import java.time.LocalTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 设备同步设置表(DeviceSyncSettings)表实体类
 *
 * @author makejava
 * @since 2025-07-09 12:00:47
 */
@Data
@TableName("t_device_sync_settings")
@EqualsAndHashCode(callSuper = true)
public class DeviceSyncSettings extends Model<DeviceSyncSettings> {
    //主键，自增
    private Long id;
    //设备外键
    private Long deviceId;

    //设备模式
    private Integer deviceModel;

    //围栏报警(bit 8)
    private Integer fenceEnabled;

    //离线报警(bit 7)
    private Integer offlineEnabled;

    //低电量报警(bit 6)
    private Integer lowBatteryEnabled;

    //传感器开关 (bit 5)
    private Integer sensorEnabled;
    //光感开关 (bit 4)
    private Integer lightEnabled;
    //蓝牙开关 (bit 3)
    private Integer bluetoothEnabled;
    //震动报警 (bit 2)
    private Integer vibrationEnabled;
    //计步开关 (bit 1)
    private Integer stepCounterEnabled;
    //GPS 开关 (bit 0)
    private Integer gpsEnabled;
    //闹钟列表，格式如 ["08:00","12:00",…]
    private Object alarmTimes;
    //勿扰模式开关
    private Integer dndEnabled;
    //勿扰开始时间 (HH:MM:SS)
    private LocalTime dndStartTime;
    //勿扰结束时间 (HH:MM:SS)
    private LocalTime dndEndTime;
    //GPS 定时上传开关
    private Integer gpsTimingEnabled;
    //GPS 定时上传间隔（秒）
    private Integer gpsTimingInterval;

    //private Integer lowBatteryEna; TODO: 待确认
    //记录创建时间
    private Date createdAt;
    //记录最后更新时间
    private Date updatedAt;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}

